import { Plugin } from "../../core";
import { ReactElement } from "react";

export enum SelectionMode {
  Hand = "Hand",
  Text = "Text",
}

export interface RenderSwitchSelectionModeProps {
  isSelected: boolean;
  mode: SelectionMode;
  onClick(): void;
}

export interface SwitchSelectionModeProps {
  children?: (props: RenderSwitchSelectionModeProps) => ReactElement;
  mode: SelectionMode;
}

export interface SwitchSelectionModeButtonProps {
  mode: SelectionMode;
}

export interface SwitchSelectionModeMenuItemProps {
  mode: SelectionMode;
  onClick(): void;
}

export interface SelectionModePlugin extends Plugin {
  SwitchSelectionMode(props: SwitchSelectionModeProps): ReactElement;
  SwitchSelectionModeButton(
    props: SwitchSelectionModeButtonProps
  ): ReactElement;
  SwitchSelectionModeMenuItem(
    props: SwitchSelectionModeMenuItemProps
  ): ReactElement;
}

export interface SelectionModePluginProps {
  selectionMode?: SelectionMode;
}
